<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>rtcpsu: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">rtcpsu
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li class="current"><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">rtcpsu Documentation</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>The Xilinx RTC driver component. This component supports the Xilinx RTC Controller. RTC Core and RTC controller are the two main important sub- components for this RTC module. RTC core can run even in the battery powered domain when the power from auxiliary source is down. Because of this, RTC core latches the calibration,programmed time. This core interfaces with the crystal oscillator and maintains current time in seconds.Calibration circuitry calculates a second with maximum 1 PPM inaccuracy using a crystal oscillator with arbitrary static inaccuracy. Core also responsible to maintain control value used by the oscillator and power switching circuitry.</p>
<p>RTC controller includes an APB interface responsible for register access with in controller and core. It contains alarm generation logic including the alarm register to hold alarm time in seconds.Interrupt management using Interrupt status, Interrupt mask, Interrupt enable, Interrupt disable registers are included to manage alarm and seconds interrupts. Address Slave error interrupts are not being handled by this driver component.</p>
<p>This driver supports the following features:</p><ul>
<li>Setting the RTC time.</li>
<li>Setting the Alarm value that can be one-time alarm or a periodic alarm.</li>
<li>Modifying the calibration value.</li>
</ul>
<p><b>Initialization &amp; Configuration</b></p>
<p>The <a class="el" href="struct_x_rtc_psu___config.html" title="This typedef contains configuration information for a device. ">XRtcPsu_Config</a> structure is used by the driver to configure itself. Fields inside this structure are properties of <a class="el" href="struct_x_rtc_psu.html" title="The XRtcPsu driver instance data. ">XRtcPsu</a> based on its hardware build.</p>
<p>To support multiple runtime loading and initialization strategies employed by various operating systems, the driver instance can be initialized in the following way:</p>
<ul>
<li>XRtcPsu_CfgInitialize(InstancePtr, CfgPtr, EffectiveAddr) - Uses a configuration structure provided by the caller. If running in a system with address translation, the parameter EffectiveAddr should be the virtual address.</li>
</ul>
<p><b>Interrupts</b></p>
<p>The driver defaults to no interrupts at initialization such that interrupts must be enabled if desired. An interrupt is generated for one of the following conditions.</p>
<ul>
<li>Alarm is generated.</li>
<li>A new second is generated.</li>
</ul>
<p>The application can control which interrupts are enabled using the <a class="el" href="group__rtcpsu__v1__0.html#ga645920d3519722e8dc815d07db527367" title="This function sets the interrupt mask. ">XRtcPsu_SetInterruptMask()</a> function.</p>
<p>In order to use interrupts, it is necessary for the user to connect the driver interrupt handler, <a class="el" href="group__rtcpsu__v1__0.html#ga01ca03d23194687c8026dc2f38da6ff7" title="This function is the interrupt handler for the driver. ">XRtcPsu_InterruptHandler()</a>, to the interrupt system of the application. A separate handler should be provided by the application to communicate with the interrupt system, and conduct application specific interrupt handling. An application registers its own handler through the <a class="el" href="group__rtcpsu__v1__0.html#ga6c782a1e080607664a88ae6dcb994c30" title="This function sets the handler that will be called when an event (interrupt) occurs that needs applic...">XRtcPsu_SetHandler()</a> function.</p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who    Date	Changes
----- -----  -------- -----------------------------------------------
1.00  kvn    04/21/15 First release
1.1   kvn    09/25/15 Modify control register to enable battery
                      switching when vcc_psaux is not available.
</pre> </div></div><!-- contents -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
